#ifndef SUBITEMSSEARCHER_H
#define SUBITEMSSEARCHER_H

#include <QObject>
#include "Task.h"

class TaskManager;
class SubItemsSearcher : public Task
{
    Q_OBJECT
public:
    SubItemsSearcher(TaskManager *ts);
    ~SubItemsSearcher();
public:
    void start();
public:
    void itemsFound(QVariantMap arg);

    bool isSearchFinished();

    void searchResultShown(QVariantMap arg);
    void mainItemFound(QVariantMap arg);
    void compareItemSelected(QVariantMap arg);
    void waitForFinished();
public:
    QString link;
private:
    volatile bool _finished = true;
    TaskManager *manager = nullptr;
};

#endif // SUBITEMSSEARCHER_H
